//
//  NetworkManger+NetWorkKingManger.m
//  DeepBreathing
//
//  Created by rimi on 15/12/16.
//  Copyright © 2015年 rimi. All rights reserved.
//

#import "NetworkManger+NetWorkKingManger.h"

@implementation NetworkManger (NetWorkKingManger)
//获取知识列表
+(void)knowledeListWithPage:(NSInteger)page successHander:(SuccessHander)success failureHander:(FailureHander)failure{
    
    NSDictionary *params123 = @{@"page":[NSString stringWithFormat:@"%ld",page],@"pageSize":@"10"};

    
    [self postWithUrl:@"app/knowledge/getKnowList.html" params:[self parasByappendingUserInfo:params123] successHander:success failureHander:failure];
    
    
    }
//获取知识详情
+(void)getKnowledgeDetailsWithId:(NSString *)Id successHander:(SuccessHander)success failureHander:(FailureHander)failure{
    NSDictionary *params123 = @{@"id":Id};
    
    [self postWithUrl:@"app/knowledge/knowDetail.html" params:[self parasByappendingUserInfo:params123] successHander:success failureHander:failure];
    
}

//添加收藏
+(void)addTocollectWithId:(NSString *)Id successHander:(SuccessHander)success failureHander:(FailureHander)failure{
    
    NSDictionary *params123 = @{@"id":Id};
    
    [self postWithUrl:@"app/knowledge/addFav.html" params:[self parasByappendingUserInfo:params123] successHander:success failureHander:failure];
    
    
    
    
}

//获取收藏列表
+(void)getFromCollectedWithPage:(NSInteger)page  successHander:(SuccessHander)success failureHander:(FailureHander)failure{
    
    NSDictionary *params123 = @{@"page":[NSString stringWithFormat:@"%ld",page],@"pageSize":@"10"};
    
    [self postWithUrl:@"app/knowledge/favList.html" params:[self parasByappendingUserInfo:params123] successHander:success failureHander:failure];
    
    
}
//删除收藏
+(void)removeFromCollectedWithId:(NSString *)Id successHander:(SuccessHander)success failureHander:(FailureHander)failure{
    
    NSDictionary *params123 = @{@"id":Id};
    
    [self postWithUrl:@"app/knowledge/delFav.html" params:[self parasByappendingUserInfo:params123] successHander:success failureHander:failure];
    
    
    }

@end
